/// @tags:
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <numeric>

using std::cin, std::cout, std::endl;

namespace BlueQuantum {

constexpr int maxn = 3e5;

char str[maxn + 1];

long long f[maxn + 1][2];

int main() {
  int x, y, z;
  cin >> x >> y >> z;
  cin >> (str + 1);
  int n = std::strlen(str + 1);
  // str[0] = 'a';
  // char cur = 'a';
  // int last = 1;
  memset(f, 0x7f, sizeof(f));
  f[0][0] = 0;
  for (int i = 1; i <= n; ++i) {
    if (str[i] == 'a') {
      f[i][0] = f[i - 1][0] + x;
      f[i][0] = std::min(f[i][0], std::min(f[i - 1][1] + z + y, f[i - 1][1] + z + x));
      f[i][1] = f[i - 1][1] + y;
      f[i][1] = std::min(f[i][1], std::min(f[i - 1][0] + z + y, f[i - 1][0] + z + x));
    } else {
      f[i][1] = f[i - 1][1] + x;
      f[i][1] = std::min(f[i][1], std::min(f[i - 1][0] + z + y, f[i - 1][0] + z + x));
      f[i][0] = f[i - 1][0] + y;
      f[i][0] = std::min(f[i][0], std::min(f[i - 1][1] + z + x, f[i - 1][1] + z + y));
    }
  }
  cout << std::min(f[n][0], f[n][1]) << endl;
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("D - Shift vs. CapsLock.in", "r", stdin);
  freopen("D - Shift vs. CapsLock.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
